<?php
namespace Admin\Controller;

class IndexController extends BaseController
{

    public function index()
    {
        $user_info = $this->getUserInfo();
        $this->assign('user_info', $user_info);
        $this->display();
    }

    public function menus()
    {
        $level = I('level');
        $pid = I('pid');
        $condition = array();
        $condition['level'] = $level;
        if (empty($pid)) {
            $condition['pid'] = $pid;
        }
        $token = I('token');
        if (empty($token)) {
            $this->error('无操作权限');
        }
        
        $list = array();
        $data = array();
        $data['id'] = 1;
        $data['title'] = '控制台';
        $data['icon'] = "fa-cubes";
        $list[] = $data;
        $this->ajaxReturn($list);
    }

    public function navMenu()
    {}

    public function main()
    {
        // $this->display();
    }
}